ROOTFS_DIR = /nfs/rootfs
MODULE_NAME = dt_drv

CROSS_COMPILE = /home/chh001/package//gcc-4.6.4/bin/arm-none-linux-gnueabi-
CC = $(CROSS_COMPILE)gcc

ifeq ($(KERNELRELEASE), )
KERNEL_DIR = /home/chh001/kernel/linux-4.14.8/
CUR_DIR = $(shell pwd)
all :
	make -C $(KERNEL_DIR) M=$(CUR_DIR) modules
	#$(CC) $(MODULE_NAME)_test.c -o $(MODULE_NAME)_test
clean :
	make -C $(KERNEL_DIR) M=$(CUR_DIR) clean

install:
	cp -raf *.ko   $(ROOTFS_DIR)/drv_module
	
else


obj-m += $(MODULE_NAME).o

endif
